package com.bookcloud.java21.chapter10.注解内置注解1010;

public class BuiltInAnnotations {
  // 内置注解 @Override
  @Override
  public String toString() {
    return "BuiltInAnnotations{}";
  }

  // 内置注解 @Deprecated
  @Deprecated(since = "2.1.5", forRemoval = true)
  public void deprecatedMethod() {
    System.out.println("deprecatedMethod");
  }

  // 内置注解 @SuppressWarnings
  @SuppressWarnings("deprecation")
  public void suppressWarningsMethod() {
    System.out.println("suppressWarningsMethod");
  }

  // 内置注解 @SafeVarargs
  @SafeVarargs
  public final void safeVarargsMethod(String... args) {
    for (String arg : args) {
      System.out.println(arg);
    }
  }
}
